package com.wondertek.poms.common.constant;

import com.wondertek.oes.sso.common.model.UserInfo;
import com.wondertek.oes.sso.common.util.SecurityUtils;

public class CurrentUser {
	public static void main(String[] args) {
		SecurityUtils.getCurrentUser();
	}

	public static String currUserName() {
		String userName = SecurityUtils.getCurrentUserName();
		if (userName == null) {
			userName = "admin";
		}
		return userName;
	}

	public static Long currUserId() {
		Long id = SecurityUtils.getCurrentUserId();
		if (id == null) {
			id = 1l;
		}
		return id;
	}

	public UserInfo currUser() {
		return SecurityUtils.getCurrentUser();
	}
}
